package com.develope.tree;

import java.io.Serializable;

import android.os.Parcel;
import android.os.Parcelable;

public class Tree  implements Parcelable/*,Serializable*/ {

	private static final long serialVersionUID = 1L;
	private String user;
	private String lo;
	private String cay;
	private String ngay;
	private String ngayNhap;
	private String ttrang;
	private String kthuoc;
	private String cdinh;
	private String bche;
	private double chCao;
	private double cvi;
	private String la;
	private String tcanh;
	private String lco;
	private String sbenh;
	private String doam;
	private double timebon;
	private double luongbon;
	private double timephun;
	private double luongphun;
	private double slcay;
	private double slluong;
	private String dgia;
	private String vdkhac;
	private String vtri;
	private String sync;

	public String getUser() {
		return user;
	}

	public void setUser(String user) {
		this.user = user;
	}

	public String getLo() {
		return lo;
	}

	public void setLo(String lo) {
		this.lo = lo;
	}

	public double getChCao() {
		return chCao;
	}

	public void setChCao(double chCao) {
		this.chCao = chCao;
	}

	public double getCvi() {
		return cvi;
	}

	public void setCvi(double cvi) {
		this.cvi = cvi;
	}

	public String getCay() {
		return cay;
	}

	public void setCay(String cay) {
		this.cay = cay;
	}

	public String getTtrang() {
		return ttrang;
	}

	public void setTtrang(String ttrang) {
		this.ttrang = ttrang;
	}

	public String getNgay() {
		return ngay;
	}

	public void setNgay(String ngay) {
		this.ngay = ngay;
	}

	public String getNgayNhap() {
		return ngayNhap;
	}

	public void setNgayNhap(String ngayNhap) {
		this.ngayNhap = ngayNhap;
	}

	public String getKthuoc() {
		return kthuoc;
	}

	public void setKthuoc(String kthuoc) {
		this.kthuoc = kthuoc;
	}

	public String getBche() {
		return bche;
	}

	public void setBche(String bche) {
		this.bche = bche;
	}

	public String getCdinh() {
		return cdinh;
	}

	public void setCdinh(String cdinh) {
		this.cdinh = cdinh;
	}

	public String getLa() {
		return la;
	}

	public void setLa(String la) {
		this.la = la;
	}

	public String getTcanh() {
		return tcanh;
	}

	public void setTcanh(String tcanh) {
		this.tcanh = tcanh;
	}

	public String getLco() {
		return lco;
	}

	public void setLco(String lco) {
		this.lco = lco;
	}

	public String getSbenh() {
		return sbenh;
	}

	public void setSbenh(String sbenh) {
		this.sbenh = sbenh;
	}

	public String getDoam() {
		return doam;
	}

	public void setDoam(String doam) {
		this.doam = doam;
	}

	public double getTimebon() {
		return timebon;
	}

	public void setTimebon(Double timebon) {
		this.timebon = timebon;
	}

	public double getLuongbon() {
		return luongbon;
	}

	public void setLuongbon(double luongbon) {
		this.luongbon = luongbon;
	}

	public double getTimephun() {
		return timephun;
	}

	public void setTimephun(Double timephun) {
		this.timephun = timephun;
	}

	public double getLuongphun() {
		return luongphun;
	}

	public void setLuongphun(double luongphun) {
		this.luongphun = luongphun;
	}

	public double getSlcay() {
		return slcay;
	}

	public void setSlcay(double slcay) {
		this.slcay = slcay;
	}

	public double getSlluong() {
		return slluong;
	}

	public void setSlluong(double slluong) {
		this.slluong = slluong;
	}

	public String getDgia() {
		return dgia;
	}

	public void setDgia(String dgia) {
		this.dgia = dgia;
	}

	public String getVdkhac() {
		return vdkhac;
	}

	public void setVdkhac(String vdkhac) {
		this.vdkhac = vdkhac;
	}

	public String getVtri() {
		return vtri;
	}

	public void setVtri(String vtri) {
		this.vtri = vtri;
	}

	public String getSync() {
		return sync;
	}

	public void setSync(String sync) {
		this.sync = sync;
	}

	@Override
	public String toString() {
		return user + ";" + lo + ";" + cay + ";" + ngay + ";" + ngayNhap + ";"
				+ ttrang + ";" + kthuoc + ";" + cdinh + ";" + bche + ";"
				+ chCao + ";" + cvi + ";" + la + ";" + tcanh + ";" + lco + ";"
				+ sbenh + ";" + doam + ";" + timebon + ";" + luongbon + ";"
				+ timephun + ";" + luongphun+";"+slcay+";"+slluong+";"+dgia+";"+vdkhac+";"+vtri;
	}

	@Override
	public int describeContents() {
		return 0;
	}

	@Override
	public void writeToParcel(Parcel out, int arg1) {
		out.writeString(user);
		out.writeString(lo);
		out.writeString(cay);
		out.writeString(ngay);
		out.writeString(ngayNhap);
		out.writeString(ttrang);
		out.writeString(kthuoc);
		out.writeString(cdinh);
		out.writeString(bche);
		out.writeDouble(chCao);
		out.writeDouble(cvi);
		out.writeString(la);
		out.writeString(tcanh);
		out.writeString(lco);
		out.writeString(sbenh);
		out.writeString(doam);
		out.writeDouble(timebon);
		out.writeDouble(luongbon);
		out.writeDouble(timephun);
		out.writeDouble(luongphun);
		out.writeDouble(slcay);
		out.writeDouble(slluong);
		out.writeString(dgia);
		out.writeString(vdkhac);
		out.writeString(vtri);
		out.writeString(sync);
	}
	
	public void readFromParcel(Parcel in) {
//		Tree obj = in.readParcelable(Tree.class.getClassLoader());
		user = in.readString();
		lo = in.readString();
		cay = in.readString();
		ngay = in.readString();
		ngayNhap = in.readString();
		ttrang = in.readString();
		kthuoc = in.readString();
		cdinh = in.readString();
		bche = in.readString();
		chCao = in.readDouble();
		cvi = in.readDouble();
		la = in.readString();
		tcanh = in.readString();
		lco = in.readString();
		sbenh = in.readString();
		doam = in.readString();
		timebon = in.readDouble();
		luongbon = in.readDouble();
		timephun = in.readDouble();
		luongphun = in.readDouble();
		slcay = in.readDouble();
		slluong = in.readDouble();
		dgia = in.readString();
		vdkhac = in.readString();
		vtri = in.readString();
		sync = in.readString();
	}
	
	public static final Parcelable.Creator<Tree> CREATOR = new Parcelable.Creator<Tree>() {

		@Override
		public Tree createFromParcel(Parcel source) {
			Tree tree = new Tree();
			tree.readFromParcel(source);
			return tree;
		}

		@Override
		public Tree[] newArray(int size) {
			return new Tree[size];
		}
	};
}
